package com.int_tech.messionLog.dao;

import com.int_tech.messionLog.entity.MessionLogShow;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

/**
 * Created by liubch on 2018/5/27.
 */
public interface MessionLogShowDao extends JpaRepository<MessionLogShow,Integer> {

    List<MessionLogShow> findMessionLogByMessionNumberOrderByCreateTimeDesc(String messionId);

    List<MessionLogShow> findMessionLogByMessionNumberAndCarNumberOrderByCreateTimeDesc(String messionId, String carNumber);

    List<MessionLogShow> findByCreateTimeAfter(Date d);

    List<MessionLogShow> findByCreateTimeAfterAndCarNumber(Date d, String s);

    Page<MessionLogShow> findByMessionCountAndCreateTimeAfter(Pageable pageRequest, String s, Date d);
}
